<template>
  <div class="noticetab-container">
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="我的通知" name="create">
        <table-index :tab="tab" v-if="tab === '0'"></table-index>
      </el-tab-pane>
      <el-tab-pane label="接收通知" name="recive">
        <table-index :tab="tab" v-if="tab === '1'"></table-index>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import tableIndex from "./table.vue";
export default {
  name: "noticeTableIndex",
  components: { tableIndex },
  data() {
    return {
      activeName: "create",
      tab: "0",
      status: ""
    };
  },
  methods: {
    handleClick(tab) {
      this.activeName = tab.name;
      this.tab = tab.index;
    }
  }
};
</script>

<style lang="scss" scoped>
.noticetab {
  &-container {
    margin: 10px 20px;
  }
}
</style>